package com.api.devices.controller;

import com.api.common.core.controller.BaseController;
import com.api.common.core.domain.AjaxResult;
import com.api.devices.domain.vo.tracing.evaluation.EvalScoreVo;
import com.api.devices.domain.vo.tree.TreeVo;
import com.api.devices.service.IClusterRealtimeService;
import com.api.devices.service.IEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/evaluation")
public class EvaluationController extends BaseController {
    @Autowired
    IEvaluationService evaluationService;

    @PostMapping("generates")
    public AjaxResult generates(@RequestBody TreeVo vo){
        return AjaxResult.success(evaluationService.generates(vo));
    }

    @PostMapping("/score")
    public AjaxResult scroe(@RequestBody EvalScoreVo vo){
        return AjaxResult.success(evaluationService.scroe(vo));
    }

    @PostMapping("/series")
    public AjaxResult series(@RequestBody EvalScoreVo vo){
        return AjaxResult.success(evaluationService.series(vo));
    }
}
